import request from '@/utils/request'

// 创建企业信息
export function createEnterprise(data) {
  return request({
    url: '/pharmaceutical/enterprise/create',
    method: 'post',
    data: data
  })
}

// 更新企业信息
export function updateEnterprise(data) {
  return request({
    url: '/pharmaceutical/enterprise/update',
    method: 'put',
    data: data
  })
}

// 删除企业信息
export function deleteEnterprise(ids) {
  return request({
    url: '/pharmaceutical/enterprise/delete?ids=' + ids,
    method: 'delete'
  })
}

// 删除企业信息
export function updateStatueEnterprise(ids,statues) {
  return request({
    url: '/pharmaceutical/enterprise/updateStatue?ids=' + ids+"&statues="+statues,
    method: 'put'
  })
}

// 获得企业信息
export function getEnterprise(id) {
  return request({
    url: '/pharmaceutical/enterprise/get?id=' + id,
    method: 'get'
  })
}

// 获得企业信息分页
export function getEnterprisePage(query) {
  return request({
    url: '/pharmaceutical/enterprise/page',
    method: 'get',
    params: query
  })
}

// 导出企业信息 Excel
export function exportEnterpriseExcel(query) {
  return request({
    url: '/pharmaceutical/enterprise/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
